package chapter04.Example15_17;
class Animal{
    void shout (){
        System.out.println("喵喵喵......");
    }

    public void eat() {
    }
}
class Dog extends Animal{
    public void shout(){
        System.out.println("汪汪汪....");
    }
    public void eat(){
        System.out.println("吃骨头");
    }
}
public class Example15 {
    public static void main(String[] args) {
        Dog dog = new Dog();
        Animal an = dog;
        an.shout();
//        an.eat();
    }
}
